package top.zxybird.yun.grift.ast;

public class Preprocessor {

  /**
   * 将注释去除
   */
  public static String stripComments(String input) {
    String multiComment = "(?s)/\\*.*?\\*/";
    String trailingComment = "//.*\\n";
    return input.replaceAll(multiComment, "").replaceAll(trailingComment, "\n");
  }

}
